<!DOCTYPE html>
<html lang="{{lang_code}}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="/favicon.png" type="image/png"> 
    <title>i2pd tunnel wizard</title>
    <style>
        html, body {
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
            margin: 0;
            height: 100%;
            overflow-y: auto;
        }
        .container {
            max-width: 750px;
            width: 100%;
            margin: 20px auto;
            background-color: white;
            padding: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }
        .tblp {
            display: flex;
            justify-content: space-between; 
            align-items: center;
        }
        h1 {
            text-align: center;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        th {
            border: 1px solid #ccc;
            padding: 10px;
            background-color: #e0e0e0;
        }
        td {
            text-align: left;
            border: 1px solid #ccc;
            padding: 10px;
        }
        td:last-child {
            width: 100px;
        }
        button {
            display: inline-block;
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            font-size: 16px;
            transition: background-color 0.3s;
            margin: 20px;
            border: none;
        }
        button:hover {
            background-color: #0056b3;
        }
        footer {
            text-align: center;
            margin-top: 20px;
            font-size: 12px;
            color: #666;
            padding: 10px 0;
        }
    </style>
</head>
<body>

    <div class="container">
        <a href="/" style="text-decoration: none"><h1><span style="color: purple">i2pd</span> <span style="color: black">tunnel wizard</span></h1></a>
        <p style="text-align: center">{{tagline}}</p>

        <form action="/generate/html" method="GET">
            <table>
                <tr>
                    <th>{{th_option}}</th>
                    <th>{{th_value}}</th>
                </tr>
                <tr>
                    <td>{{tunnel_name}}</td>
                    <td><input type="text" name="name" placeholder="{{tunnel_name_p}}" value="MY_TUNNEL"></td>
                </tr>
                <tr>
                    <td>{{tunnel_type}}</td>
                    <td>
                        <select name="type" style="width: 100%">
                            <option value="client">{{client_tcp}}</option>
                            <option value="udpclient">{{client_udp}}</option>
                            <option value="server">{{server_tcp}}</option>
                            <option value="udpserver">{{server_udp}}</option>
                            <option value="http">{{server_http}}</option>
                            <option value="irc">{{server_irc}}</option>
                            <option value="socks">{{socks_proxy}}</option>
                            <option value="httpproxy">{{http_proxy}}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        {{length}}
                    </td>
                    <td>
                        <p class="tblp">{{inbound}}: <input type="number" name="inbound.length" value="3" min="0" max="8"></p>
                        <p class="tblp">{{outbound}}: <input type="number" name="outbound.length" value="3" min="0" max="8"></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        {{quantity}}
                    </td>
                    <td>
                        <p class="tblp">{{inbound}}: <input type="number" name="inbound.quntity" value="5" min="1" max="16"></p>
                        <p class="tblp">{{outbound}}: <input type="number" name="outbound.quntity" value="5" min="1" max="16"></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        {{variance}}
                    </td>
                    <td>
                        <p class="tblp">{{inbound}}: <input type="number" name="inbound.lengthVariance" value="0" min="-3" max="3"></p>
                        <p class="tblp">{{outbound}}: <input type="number" name="outbound.lengthVariance" value="0" min="-3" max="3"></p>
                    </td>
                </tr>
                <tr>
                    <td>{{b33}}</td>
                    <td><input type="checkbox" name="blinded" value="true"></td>
                </tr>
                <tr> 
                    <td>{{transient}}</td>
                    <td><input type="checkbox" name="transient" value="true"></td>
                </tr>
                <tr>
                    <td>{{keepalive}}</td>
                    <td><input type="number" name="keepalive" value="0" min="0" max="128"></td>
                </tr>
                <tr>
                    <td>{{comments}}</td>
                    <td><input type="checkbox" name="comments" value="true" checked></td>
                </tr>
            </table>
            
            <center><button type="submit">{{generate}}</button></center>
        </form>
    </div>

    <footer>
        <div>
            <a href="/?lang=en">English</a> | <a href="/?lang=ru">Русский</a>
        </div>
        <div>
            <a href="https://notabug.org/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
            acetone, 2025 (no copyright)
        </div>
    </footer>

</body>
</html>
